<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

</body>
</html>
<script>
    // caches.delete('c1');
    // caches.delete('c2');
    // Promise.all([
    //     caches.open('c1').then(function(cache) {
    //         return cache.put('/hehe', new Response('aaa', { status: 200 }));
    //     }),
    //     caches.open('c2').then(function(cache) {
    //         cache.keys().then(function(cachedRequests) {
    //             console.log(cachedRequests);
    //         });
    //         return cache.put('/hehe', new Response('bbb', { status: 200 }));
    //     })
    // ]).then(function() {
    //     return caches.match('/hehe');
    // }).then(function(response) {
    //     return response.text();
    // }).then(function(body) {
    //     console.log(body);
    // });

    // caches.open('silence').then(function(cache) {
    //     cache.put('/haha', new Response('/aaa', {status: 200, meg: 'good'}));
    // });

    caches.open('maopp').then(function (cache) {
        return fetch('http://share.maopp.cn:8080/api/3.0.0/share/shareSkillDynamic2',{
            method: 'POST',
            body: JSON.stringify({
                beUserId:16,
                dynamicId:95,
            }),
            headers: {
                'Content-Type': 'application/json',
            },
        }).then(function (response) {
            cache.put('http://share.maopp.cn:8080/api/3.0.0/share/shareSkillDynamic2', response.clone());
        });
    });

</script>